var settings = require('../settings')
var enabled = settings.KAFKA.ENABLED

var Producer = function () { }
Producer.prototype.send = function () {
  console.log(arguments)
}
var producer = new Producer();

if (enabled) {
  var kafka = require('kafka-node')
  var client = new kafka.KafkaClient(settings.KAFKA.CONFIG);
  producer = new kafka.Producer(client);
}


module.exports = {
  producer
}
